/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.ka.entity;

import org.hibernate.validator.constraints.Length;

import com.kaaction.common.persistence.DataEntity;
import com.kaaction.common.utils.excel.annotation.ExcelField;

/**
 * 供应商Entity
 * @author huanghaiming
 * @version 2017-06-14
 */
public class KaSupplier extends DataEntity<KaSupplier> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 货主名称
	private String code;		// code
	private String plant;		// 厂房 0:无,1:有
	private String mobile;		// 电话
	private String contact;		// 联系人
	private String address;		// 详细地址
	
	public KaSupplier() {
		super();
	}

	public KaSupplier(String id){
		super(id);
	}

	@Length(min=1, max=64, message="货主名称长度必须介于 1 和 64 之间")
	@ExcelField(title="供应商", align=2, sort=6)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=64, message="code长度必须介于 0 和 64 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=3, message="厂房 0:无,1:有长度必须介于 0 和 3 之间")
	public String getPlant() {
		return plant;
	}

	public void setPlant(String plant) {
		this.plant = plant;
	}
	
	@Length(min=0, max=18, message="电话长度必须介于 0 和 18 之间")
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	@Length(min=0, max=18, message="联系人长度必须介于 0 和 18 之间")
	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}
	
	@Length(min=0, max=255, message="详细地址长度必须介于 0 和 255 之间")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
}